package com.example.jpademo.db.repo;

import com.example.jpademo.db.entity.BondDeal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
import java.util.List;

public interface BondDealRepository extends JpaRepository<BondDeal, String>, JpaSpecificationExecutor<BondDeal> {
    @Query(value = "select * from bond_deal limit 10", nativeQuery = true)
    List<BondDeal> getTop10();
}